package a入门.day6.数组工具类;

import java.util.Arrays;

public class Test2 {
    public static void main(String[] args) {
        int[]arr={1,3,4,2,5};//119
        int[]s=  {1,3,4,2,5};//223
        System.out.println(Arrays.equals(arr,s));
//        sortDes(arr);
//        System.out.println(Arrays.toString(arr));
    }

    static void showArr1(int[]a){
        for (int t:a){
            System.out.println(t);
        }
    }
    static void showArr2(int[]a){
        for (int i = a.length-1; i >=0 ; i--) {
            System.out.println(a[i]);
        }
    }
    static void sortDes(int[]a){
        for(int i=0;i<a.length-1;i++){
            for(int j=0;j<a.length-1-i;j++){
                if (a[j] < a[j+1]) {
                    int tmp=a[j];
                    a[j]=a[j+1];
                    a[j+1]=tmp;
                }
            }
        }
    }
}
